<?php
if(!check_manager_login()) exit('无权查看，请登录!');
require_once MODEL_PATH.DS.'Album.php';
$Album = new Album();
if(check_post()){
	$name = trim($_POST['name']);
	if(empty($name)) redirect('index.php?mod=album&act=list','名称不能为空！');

	$result = $Album->addAlbum($name,trim($_POST['desc']));
	if($result){
		redirect('index.php?mod=album&act=list','添加成功！');
	}
}

include load_tpl('album_add');
?>